Composer 执行脚本
配置
{ "scripts": { "symfony-scripts": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" ], "post-install-cmd": [ "@symfony-scripts", "YourHandler::installCmd" ], "test-cmd": [ "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache" ] } }
|
执行
composer run-script symfony-scripts composer run-script post-install-cmd composer run-script test-cmd
|
在scripts里,还可以通过 @ 调用其它 script, 如 @symfony-scripts